<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template member/header}

	<script>
		var gameid = {$cid};
		var playid = {$pid};
	</script>
	<input type="hidden" id="hdErrMsg" />
	<div class="main-head">
		<span>用户中心 &gt; 投注记录 &gt; 追号查询</span>
	</div>
	<div class="con_box">
		<form id="form1" action="?" method="get">
			<input type="hidden" name="m" value="{$m}" />
			<input type="hidden" name="c" value="{$c}" />
			<input type="hidden" name="a" value="{$a}" />
			<div class="form-box">
				<span>
					时间：
					<input type="text" id="dtrange" name="dtrange" value="{$dtrange}" class="dtrange" readonly="readonly">
				</span>
				<span>
					彩种：
					<select name="cid" id="cid" data-bind="value:gameid,event:{change:gameEvent}">
						<option value="0">所有游戏</option>
						{loop $lottery as $val}
						<option value="{$val['id']}">{$val['title']}</option>
						{/loop}
					</select>
				</span>
				<span>
					玩法：<select name="pid" id="pid" data-bind="value:playid,options: gamePlayList, optionsText: 'Name',optionsValue: 'ID'"></select>
				</span>
				<span>
					状态：
					<select name="status">
						<option value="0">全部</option>
						<option value="1"{if $status == 1} selected="selected"{/if}>未中奖</option>
						<option value="2"{if $status == 2} selected="selected"{/if}>已中奖</option>
					</select>
				</span>
				<span><a href="javascript:void(0)" class="btn" data-bind="click:searchData">查询</a></span>
			</div>
		</form>
		<div class="table-list">
			<table>
				<thead>
					<tr>
						<th>追号编号</th>
						<th>追号时间</th>
						<th>彩种</th>
						<th>玩法</th>
						<th>追号内容</th>
						<th>开始期号</th>
						<th>总金额</th>
						<th>完成金额</th>
						<th>追号期数</th>
						<th>完成期数</th>
						<th>状态</th>
					</tr>
				</thead>
				<tbody>
					{if $data}
						{loop $data as $val}
						<tr>
							<td><a style="color:blue;" href="{U($m.'/'.$c.'/view',['id'=>$val['id']])}">{$val['id']}</a></td>
							<td>{date('Y/m/d H:i:s',$val['dateline'])}</td>
							<td>{$cids[$val['cid']]['title']}</td>
							<td>{$val['name']}</td>
							<td><span title="{$val['rednum']}">{$val['rednum']}</span></td>
							<td>{$val['period']}期</td>
							<td>{$val['money']}</td>
							<td>{$val['okmoney']}</td>
							<td>{$val['num']}</td>
							<td>{$val['oknum']}</td>
							<td>
								{if $val['status'] == 1}
									<span class="fc_green status-lose">追号中</span>
								{elseif $val['status'] == 2}
									<span class="fc_green status-lose">已完成</span>
								{/if}
							</td>
						</tr>
						{/loop}
					{else}
						<tr>
							<td colspan="11">请选择查询条件之后进行查询</td>
						</tr>
					{/if}
				</tbody>
				{if $data}
				<tfoot>
					<tr>
						<td colspan="6">小计1笔</td>
						<td>{$num['money']}</td>
						<td>{$num['okmoney']}</td>
						<td></td>
						<td></td>
						<td></td>
					</tr>
					<tr>
						<td colspan="6">总计1笔</td>
						<td>{$num['money2']}</td>
						<td>{$num['okmoney2']}</td>
						<td></td>
						<td></td>
						<td></td>
					</tr>
				</tfoot>
				{/if}
			</table>
			<div class="page">
				<span class="page-inner">{$multi}</span>
			</div>
		</div>
		<div class="tips">
			<p>备注：点击“追号编号”可查看追号详情</p>
		</div>
	</div>
	<script src="static/js/User.order.js"></script>
	<script src="static/js/laydate/laydate.js"></script>
	<script>
		$().ready(function(){
			laydate.render({
				elem: '#dtrange',
				range: true
			});
		});
	</script>
	
    <div id="SEARCH-TIP" style="display:none;">
        <div class="mask"></div>
        <div class="popup tips-popup">
            <div class="popup-head">
                <span>提示</span>
            </div>
            <div class="popup-body">
                <p>查询中,请您耐心等待.....</p>
            </div>
        </div>
    </div>

{template member/footer}